<template>
  <div class="error-page">
    <div class="error-container">
      <div class="error-code">403</div>
      <div class="error-title">权限不足</div>
      <div class="error-message">抱歉，您没有权限访问此页面</div>
      <div class="error-actions">
        <el-button type="primary" @click="goBack">返回上一页</el-button>
        <el-button @click="goHome">返回首页</el-button>
      </div>
    </div>
  </div>
</template>

<script lang="ts" setup>
import { useRouter } from "vue-router";

const router = useRouter();

const goBack = () => {
  router.go(-1);
};

const goHome = () => {
  router.push("/admin");
};
</script>

<style lang="less" scoped>
.error-page {
  min-height: 100vh;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;

  .error-container {
    text-align: center;
    padding: 40px;

    .error-code {
      font-size: 120px;
      font-weight: bold;
      color: #409eff;
      margin-bottom: 20px;
    }

    .error-title {
      font-size: 24px;
      color: #333;
      margin-bottom: 10px;
    }

    .error-message {
      font-size: 16px;
      color: #666;
      margin-bottom: 30px;
    }

    .error-actions {
      .el-button {
        margin: 0 10px;
      }
    }
  }
}
</style>
